import { Controller } from 'egg';

export default class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = {
      code: 200,
      message: '美食+游玩服务启动成功！',
      data: {
        service: 'luck-play-service',
        version: '1.0.0',
        timestamp: new Date().toISOString(),
      },
    };
  }

  async health() {
    const { ctx } = this;
    ctx.body = {
      code: 200,
      message: '服务健康检查通过',
      data: {
        status: 'healthy',
        uptime: process.uptime(),
        timestamp: new Date().toISOString(),
      },
    };
  }
}